{template "header.html"}
<link href="{THEME_PATH}assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />
<script src="{THEME_PATH}assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.finecms.js" type="text/javascript"></script>

<script type="text/javascript">
    if (App.isAngularJsApp() === false) {
        jQuery(document).ready(function() {
            if (jQuery().datepicker) {
                $('.date-picker').datepicker({
                    rtl: App.isRTL(),
                    orientation: "left",
                    autoclose: true
                });
            }
        });
    }
</script>

<div class="right-card-box">
<div class="row table-search-tool">
    <form action="{SELF}" method="get">
        {dr_form_search_hidden()}
        <div class="col-md-12" style="padding-right: 0">
            <label>
                <div class="input-group fc-input-time date date-picker" data-date-format="yyyy-mm-dd">
                    <input type="text" class="form-control" name="time" value="{$time}">
                        <span class="input-group-btn">
                            <button class="btn default" type="button">
                                <i class="fa fa-calendar"></i>
                            </button>
                        </span>
                </div>
            </label>
        </div>

        <div class="col-md-12">
            <label><button type="submit" class="btn green btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
            <label><button type="button" onclick="dr_ajax_option('{dr_url('error/del', ['time'=>$time])}', '{dr_lang('你确定要清空当天记录吗？')}', 1)" class="btn red btn-sm"> <i class="fa fa-trash"></i> {dr_lang('清空')}</button></label>
        </div>
    </form>
</div>
<form class="form-horizontal" role="form" id="myform">
    {dr_form_hidden()}
        <div class="table-scrollable">
    <table class="table table-striped table-bordered table-hover table-checkable dataTable">
        <thead>
        <tr class="heading">
            <th width="170">{dr_lang('时间')}</th>
            <th>{dr_lang('错误')}</th>
        </tr>
        </thead>
        <tbody>
        {loop $list $id $t}
        <tr class="odd gradeX" id="dr_row_{$id}">
            <td>{$t.time}</td>
            <td>
                <a onclick="dr_show_file_code('{dr_lang('查看文件')}', '{dr_url('error/log_show', ['time'=>$time])}')">{dr_strcut($t.message, 80)}</a>
            </td>
        </tr>
        {/loop}
        </tbody>
    </table></div>
    <div class="row">
        <div class="col-md-12 col-sm-12 text-right">
            {$mypages}
        </div>
    </div>

</form>
</div>
{template "footer.html"}